package com.ebook.entity;

import lombok.Data;

import javax.swing.*;
import java.awt.*;
import java.io.Serializable;
@Data
public class Book implements Serializable {
    private Integer book_id;
    private String book_name;
    private String authors;
    private String summary;
    private boolean charge;
    private String directory;
    private Integer category_id;
    private String source;
    private String source_storage;
    private String front_page;

    public Book(int i, String j, String k) {
        this.book_id = i;
        this.book_name = j;
        this.authors = k;
    }

    public Integer getBook_id() {
        return book_id;
    }

    public void setBook_id(Integer book_id) {
        this.book_id = book_id;
    }

    public String getBook_name() {
        return book_name;
    }

    public void setBook_name(String book_name) {
        this.book_name = book_name;
    }

    public String getAuthors() {
        return authors;
    }

    public void setAuthors(String authors) {
        this.authors = authors;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public boolean isCharge() {
        return charge;
    }

    public void setCharge(boolean charge) {
        this.charge = charge;
    }

    public String getDirectory() {
        return directory;
    }

    public void setDirectory(String directory) {
        this.directory = directory;
    }

    public Integer getCategory_id() {
        return category_id;
    }

    public void setCategory_id(Integer category_id) {
        this.category_id = category_id;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getSource_storage() {
        return source_storage;
    }

    public void setSource_storage(String source_storage) {
        this.source_storage = source_storage;
    }

    public String getFront_page() {
        return front_page;
    }

    public void setFront_page(String front_page) {
        this.front_page = front_page;
    }

    /**调试专用**/
    public Image getImage(){
        return new ImageIcon("G:\\Java\\ebook_maven\\src\\main\\resources\\logic\\ui\\shuffle\\1.png").getImage();
    }

    @Override
    public String toString() {
        return "Book{" +
                "book_id=" + book_id +
                ", book_name='" + book_name + '\'' +
                ", authors='" + authors + '\'' +
                ", summary='" + summary + '\'' +
                ", charge=" + charge +
                ", directory='" + directory + '\'' +
                ", category_id=" + category_id +
                ", source='" + source + '\'' +
                ", source_storage='" + source_storage + '\'' +
                ", front_page='" + front_page + '\'' +
                '}';
    }
}
